package com.l2jserver.gameserver.network.serverpackets;

import com.l2jserver.gameserver.datatables.PrimeShopTable.PrimeShopItem;

/**
 * @author fissban
 */
public class ExBrProductInfo extends L2GameServerPacket
{
	private final int _brId;
	private final int _price;
	private final int _cat;
	private final int _itemId;
	private final int _count;
	private final int _weight;
	private final int _tradable;
	
	public ExBrProductInfo(int brId, PrimeShopItem item)
	{
		_brId = brId;
		_price = item.getPrimeItemPrice();
		_cat = item.getPrimeItemCat();
		_itemId = item.getPrimeItemId();
		_count = item.getPrimeItemCount();
		_weight = item.getPrimeWeight();
		_tradable = item.getPrimeTradable();
	}
	
	@Override
	protected void writeImpl()
	{
		
		writeC(0xFE);
		writeH(0xD7);
		
		writeD(_brId); // product id
		writeD(_price); // points
		writeD(_cat); // cat
		writeD(_itemId); // item id
		writeD(_count); // quality
		writeD(_weight); // weight
		writeD(_tradable); // 0 - dont drop/trade
	}
}